package com.banciyuan.wallpaper.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.banciyuan.wallpaper.services.ListenSevices;
import com.banciyuan.wallpaper.setting.SettingConfig;

/**
 * Created by squall on 2016/8/1.
 */
public class RestartListener extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals("change.restart")) {
            if (SettingConfig.ReadSettingBoolean(context, SettingConfig.CHANGE)) {
                Intent service = new Intent(context, ListenSevices.class);
                context.startService(service);
            }
        }
    }
}
